From: Colin Walters Date: Fri, 24 Sep 2010 17:55:12 +0000 (-0400) Subject: telepathy: Use string.replace in a way compatible with newer Spidermonkey X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~1013^2^2~9699 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=e22fbda689153570b8fbaee3dfbe2a583c53ed98;p=gnome-shell.git telepathy: Use string.replace in a way compatible with newer Spidermonkey The semantics of the first argument changed from literal -> regexp if the 'g' option was specified. To remove ambiguity, stop using the spidermonkey extension and create a standard RegExp object. https://bugzilla.gnome.org/show_bug.cgi?id=630539 --- diff --git a/js/misc/telepathy.js b/js/misc/telepathy.js index e4d1a7aee..c1443fb30 100644 --- a/js/misc/telepathy.js +++ b/js/misc/telepathy.js @@ -17,13 +17,13 @@ function makeProxyClass(iface) { } function nameToPath(name) { - return '/' + name.replace('.', '/', 'g'); + return '/' + name.replace(/\./g, '/'); }; function pathToName(path) { if (path[0] != '/') throw new Error('not a D-Bus path: ' + path); - return path.substr(1).replace('/', '.', 'g'); + return path.substr(1).replace(/\//g, '.'); }; // This is tp_escape_as_identifier() from telepathy-glib